﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:GameLogic_Controls="clr-namespace:GameLogic.Controls;assembly=GameLogic"
    xmlns:local="clr-namespace:Dodger"
    x:Class="Dodger.MainPage"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400"
    Width="Auto"
    Height="Auto">
    <UserControl.Resources>

        <Style
            x:Key="GameContainerStyle1"
            TargetType="GameLogic_Controls:GameContainer">
            <Setter
                Property="Template">
                <Setter.Value>
                    <ControlTemplate
                        TargetType="GameLogic_Controls:GameContainer">
                        <Grid
                            d:DesignWidth="306"
                            d:DesignHeight="296">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup
                                    x:Name="GameContainerStates">
                                    <VisualState
                                        x:Name="StartScreen">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState
                                        x:Name="HighscoreScreen">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState
                                        x:Name="SettingsScreen">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation
                                                Duration="0"
                                                To="1"
                                                Storyboard.TargetProperty="(UIElement.Opacity)"
                                                Storyboard.TargetName="textBlock"
                                                d:IsOptimized="True" />
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState
                                        x:Name="GameScreenGameReady">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gamePauseButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameContinueButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(ContentControl.Content)"
                                                Storyboard.TargetName="_gameStartButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0"
                                                    Value="Start Game" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameStartButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState
                                        x:Name="GameScreenGameRunning">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gamePauseButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameContinueButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameBackButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameStartButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState
                                        x:Name="GameScreenGamePaused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gamePauseButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameContinueButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameBackButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameStartButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState
                                        x:Name="GameScreenGameOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_startScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_highScoreScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_settingsScreen">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gamePauseButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameContinueButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameBackButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetProperty="(UIElement.Visibility)"
                                                Storyboard.TargetName="_gameStartButton">
                                                <DiscreteObjectKeyFrame
                                                    KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid
                                x:Name="_startScreen"
                                d:IsHidden="True">
                                <TextBlock
                                    TextWrapping="Wrap"
                                    Text="Start Screen"
                                    VerticalAlignment="Top" />
                                <StackPanel
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center">
                                    <Button
                                        x:Name="_startButton"
                                        Content="Start" />
                                    <Button
                                        x:Name="_highscoreButton"
                                        Content="Highscore" />
                                    <Button
                                        x:Name="_settingsButton"
                                        Content="Settings" />
                                </StackPanel>
                            </Grid>
                            <Grid
                                x:Name="_highScoreScreen"
                                d:IsHidden="True">
                                <GameLogic_Controls:HighscoreControl
                                    x:Name="_highscores" />
                                <TextBlock
                                    Margin="0,0,46,0"
                                    TextWrapping="Wrap"
                                    VerticalAlignment="Top"
                                    d:LayoutOverrides="Width"
                                    Text="Highsore Screen " />
                                <StackPanel
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom">
                                    <Button
                                        x:Name="_highscoreBackButton"
                                        Content="Back to Menu" />
                                </StackPanel>
                            </Grid>
                            <Grid
                                x:Name="_gameScreen">
                                <GameLogic_Controls:TimerControl
                                    x:Name="_timer"
                                    RenderTransformOrigin="0,0"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Bottom"
                                    Margin="0"
                                    Canvas.ZIndex="1"
                                    IsCountdown="False"
                                    IsDefeatCondition="False"
                                    StartValue="0">
                                    <GameLogic_Controls:TimerControl.RenderTransform>
                                        <CompositeTransform />
                                    </GameLogic_Controls:TimerControl.RenderTransform>
                                </GameLogic_Controls:TimerControl>
                                <GameLogic_Controls:LifeControl
                                    x:Name="_lives"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Top"
                                    Margin="0"
                                    Canvas.ZIndex="1" />
                                <GameLogic_Controls:ScoreControl
                                    x:Name="_scores"
                                    VerticalAlignment="Top"
                                    HorizontalAlignment="Right"
                                    Margin="0"
                                    Canvas.ZIndex="1"
                                    VictoryValue="0" />
                                <ContentControl
                                    x:Name="_gameContent"
                                    Content="ContentControl"
                                    d:LayoutOverrides="Width, Height"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center" />
                                <Button
                                    x:Name="_gameBackButton"
                                    Content="Back to Menu"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom"
                                    d:LayoutOverrides="HorizontalAlignment, VerticalAlignment"
                                    Margin="0"
                                    Canvas.ZIndex="1" />
                                <Button
                                    x:Name="_gamePauseButton"
                                    Content="Pause"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom" />
                                <Button
                                    x:Name="_gameContinueButton"
                                    Content="Continue Game" />
                                <Button
                                    x:Name="_gameStartButton"
                                    Content="Start Game" />
                            </Grid>
                            <Grid
                                x:Name="_settingsScreen"
                                d:IsHidden="True">
                                <TextBlock
                                    x:Name="textBlock"
                                    HorizontalAlignment="Left"
                                    TextWrapping="Wrap"
                                    Text="Settings Screen"
                                    VerticalAlignment="Top" />
                                <StackPanel
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom">
                                    <Button
                                        x:Name="_settingsBackButton"
                                        Content="Back to Menu" />
                                </StackPanel>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


    </UserControl.Resources>

    <Grid
        x:Name="LayoutRoot"
        Width="Auto"
        Height="Auto">
        <GameLogic_Controls:GameContainer
            SettingsVisible="False"
            Style="{StaticResource GameContainerStyle1}">
            <GameLogic_Controls:GameContainer.GameControl>
                <local:DodgerGame />
            </GameLogic_Controls:GameContainer.GameControl>
        </GameLogic_Controls:GameContainer>
    </Grid>
</UserControl>
